import React from 'react';
import { withRouter } from 'react-router-dom';
import CommerceCard from './index';

@withRouter
export default class Commerce extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            ps: {}
        }
    }
    componentWillMount() {
        const { match, params } = this.props;
        const ps = params ? params : match.params;
        this.setState({ ps: ps });
    }

    render() {
        const { ps } = this.state;
        return (
            <CommerceCard params={ps} />
        );
    }
}



